package com.clothing.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @ClassName: CommentReply
 * @Description: TODO(评论回复)
 * @author Charles.Tao
 * @date 2017年9月4日 下午5:04:31
 * @version 1.0
 */
@Entity
@Table(name = "comment_reply")
public class CommentReply extends BaseEntity
{
    /**
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
     */
    private static final long serialVersionUID = 711242287930660002L;

    private Comment comment;

    private String content;

    private User creator;

    private User other;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "comment", nullable = false)
    public Comment getComment()
    {
        return comment;
    }

    public void setComment(Comment comment)
    {
        this.comment = comment;
    }

    @Column(name = "content", nullable = false)
    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "creator", nullable = false)
    public User getCreator()
    {
        return this.creator;
    }

    public void setCreator(User creator)
    {
        this.creator = creator;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "other", nullable = false)
    public User getOther()
    {
        return this.other;
    }

    public void setOther(User other)
    {
        this.other = other;
    }
}
